// Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.kpdus.com/jad.html
// Decompiler options: packimports(3) 

package com.imsl;

import java.text.MessageFormat;
import java.util.GregorianCalendar;
import java.util.ResourceBundle;


public class Messages
{
    public static String formatMessage(String s, String s1, Object aobj[])
    {
        ResourceBundle resourcebundle = ResourceBundle.getBundle(s);
        if(aobj != null)
        {
            aobj = (Object[])aobj.clone();
            for(int i = 0; i < aobj.length; i++)
                if(aobj[i] instanceof GregorianCalendar)
                    aobj[i] = ((GregorianCalendar)aobj[i]).getTime();

        }
        return MessageFormat.format(resourcebundle.getString(s1), aobj);
    }

    public static String formatMessage(String s, String s1)
    {
        return formatMessage(s, s1, null);
    }

    public static void throwIllegalArgumentException(String s, String s1, Object aobj[])
    {
        throw new IllegalArgumentException(formatMessage(s + ".ErrorMessages", s1, aobj));
    }
}
